import request from '@/utils/request'

// 查询退货管理列表
export function listReturns(query) {
  return request({
    url: '/returns/returns/list',
    method: 'get',
    params: query
  })
}

// 查询退货管理详细
export function getReturns(rid) {
  return request({
    url: '/returns/returns/' + rid,
    method: 'get'
  })
}

// 新增退货管理
export function addReturns(data) {
  return request({
    url: '/returns/returns',
    method: 'post',
    data: data
  })
}

// 修改退货管理
export function updateReturns(data) {
  return request({
    url: '/returns/returns',
    method: 'put',
    data: data
  })
}

// 删除退货管理
export function delReturns(rid) {
  return request({
    url: '/returns/returns/' + rid,
    method: 'delete'
  })
}

//商品退货统计
export function getReturnsInfo() {
  return request({
    url: '/returns/returns/getReturnsInfo',
    method: 'get',
  })
}
